
<div id="menuitem-add">
    <empty name="Think.session.miid">
            <eq name="Think.get.adds" value="custom">
                <form action="__APP__/MenuItem/insert" method="post">
                    <input type="hidden" name="menuid" value="<{$Think.get.mid}>" />
                    <input type="hidden" name="componentid" value="<{$Think.get.cid}>" />
                <else/>
                    <form action="__APP__/MenuItem/insert" method="post">
                        <input type="hidden" name="menuid" value="<{$Think.post.mid}>" />
                        <input type="hidden" name="componentid" value="<{$Think.post.cid}>" />
            </eq>

        <else/>
            <form action="__APP__/MenuItem/update" method="post">
            <input type="hidden" name="id" value="<{$Think.session.miid}>" />
            <input type="hidden" name="mid" value="<{$Think.post.mid}>" />
    </empty>
        菜单项名称：<input type="text" class="text" name="name" value="<{$Think.post.getname}>" /><br />
        别　　　名：<input type="text" class="text" name="alias" /><br />
        类　　　型：<input type="text" class="text" name="type" value="<{$list['model']}>" /><br />
        地　　　址：<input type="text" class="text" name="link" value="index.php/<{$list['model']}>/<{$list['action']}>/id/<{$Think.post.sid}>"  /><br />
        排　　　序：<input type="text" name="sort" class="text" value="0" /><br />
        打　　　开：<input type="text" name="howopen" class="text" /><br />
        路　　　径：<select class="pid" name="pid" size="18">
        <option value="0" selected="selected">根菜单项</option>
        <volist name="item" id="vo">
            <empty name="Think.session.miid">
                    <option value="<{$vo['id']}>">PID为<{$vo['pid']}><{$vo['nbsp']}>|-- <{$vo['name']}>|-- ID为<{$vo['id']}></option>
                <else/>
                    <eq name="vo.id" value="$Think.session.miid">
                        <option selected="selected" value="<{$vo['id']}>">PID为<{$vo['pid']}><{$vo['nbsp']}>|-- <{$vo['name']}>|--ID为<{$vo['id']}></option>
                        <else/>
                        <option value="<{$vo['id']}>">PID为<{$vo['pid']}><{$vo['nbsp']}>|-- <{$vo['name']}>|-- ID为<{$vo['id']}></option>
                    </eq>
            </empty>

        </volist>
        </select><br />

    <empty name="Think.session.miid">
            <input type="submit" class="submit" value="添加菜单项" />
        <else/>
            <input type="submit" class="submit" value="重写菜单项" />
    </empty>



    </form>
</div>